package com.morehair.mapper;

import com.morehair.bean.pojo.Category;
import com.morehair.bean.pojo.CategoryExample;
import com.morehair.bean.vo.wx.CategoryInHomeVo;
import com.morehair.bean.vo.wx.HomeIndexVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CategoryMapper {
    long countByExample(CategoryExample example);

    int deleteByExample(CategoryExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Category record);

    int insertSelective(Category record);

    List<Category> selectByExample(CategoryExample example);

    Category selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Category record, @Param("example") CategoryExample example);

    int updateByExample(@Param("record") Category record, @Param("example") CategoryExample example);

    int updateByPrimaryKeySelective(Category record);

    int updateByPrimaryKey(Category record);

    List<Category> selectByRandom();

    List<HomeIndexVo.FloorGoodsList> selectToFloorGoods();

    Category selectByPid(Integer firstLevelCategoryId);

    CategoryInHomeVo.ParentCategory selectByPidInHomeCategory(Integer id);

    List<CategoryInHomeVo.BrotherCategory> selectByPidForBroToList(@Param("pid") Integer id);

    CategoryInHomeVo.CurrentCategory selectByIdForCurrent(Integer id1);
}